package com.rpframework.website.device.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.rpframework.core.BaseService;
import com.rpframework.utils.Pager;
import com.rpframework.website.device.dao.IOpinionDao;
import com.rpframework.website.device.domain.Opinion;

@Service
public class OpinionService extends BaseService{
 public	@Resource IOpinionDao iadao;
	
	
	public Pager<Opinion> getpager(Pager<Opinion> pager) {
		long startTime=System.currentTimeMillis();
		List<Opinion>  list=iadao.doPager(this.packageMyBatisParam(pager));
		pager.setItemList(list);
		pager.setCostTime(System.currentTimeMillis() - startTime);
		return pager;
	}


	public Opinion selectOnlyOne(int parseInt) {
		// TODO Auto-generated method stub
		return iadao.select(parseInt);
	}


	public boolean insertdo(Opinion dynamic) {
		// TODO Auto-generated method stub
		return iadao.insert(dynamic);
	}


	public boolean updatewiden(Opinion dynamic) {
		// TODO Auto-generated method stub
		return iadao.update(dynamic);
	}
}
